
// GenCovReportDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include "ParseCoverageData.h"

class CFileProp
{
public:
	CFileProp()
	{
		memset(&covData, 0, sizeof(covData));
	}

	FILELIST lstFileID;
	wstring sFilePath;
	COVERAGE_DATA covData;
	LINELIST lines;
};

// CGenCovReportDlg dialog
class CGenCovReportDlg : public CDialog
{
// Construction
public:
	CGenCovReportDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_GENCOVREPORT_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

// Implementation
protected:
	HICON m_hIcon;
	CListBox m_lstFiles;
	CListBox m_lstSources;
	CListBox m_lstFilters;
	int m_iFilterType;
	CString m_sFilter;
	CParseCoverageData m_Parser;
	LINELIST* m_pLines;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	void RefreshFiles();
	void ClearFiles();
	int GetLinesCovered();
	BOOL FileNameMatch(const wstring& sFile1, const wstring& sFile2);
	BOOL CheckFilter(LPCWSTR lpszFileName);
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()

public:
	int IsLineCovered(int nLineNo);

	afx_msg void OnBnClickedSelectcov();
	afx_msg void OnBnClickedDelfile();
	afx_msg void OnBnClickedAddfilter();
	afx_msg void OnBnClickedDelfilter();
	afx_msg void OnBnClickedGenerate();
	afx_msg void OnBnClickedApplyfilter();
	// 
};
